package fruit;

import impl.Fruit;

/**
 * 苹果实体类
 */
public class Apple implements Fruit {

    // 水果名称
    private String name;

    // 水果单价
    private Double price;

    // 水果公斤
    private Double kilogram;

    public Apple() {
    }

    public Apple(String name) {
        this.name = name;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public Fruit setName(String name) {
        this.name = name;
        return this;
    }

    @Override
    public Double getPrice() {
        return price;
    }

    @Override
    public Fruit setPrice(Double price) {
        this.price = price;
        return this;
    }

    @Override
    public Double getKilogram() {
        return kilogram;
    }

    @Override
    public Fruit setKilogram(Double kilogram) {
        this.kilogram = kilogram;
        return this;
    }


}
